Tidy data:
plots_df = read_csv("./data/final_regression_variables_clean.csv") %>%
mutate(poverty_level = cut(poverty, breaks = c(-Inf, 10, 20, 30, 40, Inf), labels = c("poverty_10","poverty_20", "poverty_30", "poverty_40", "poverty_40+"))) %>%
pivot_longer(
cols = hispanic:other_race,
names_to = "race",
values_to = "percent_pop",
values_drop_na = TRUE
)
## Parsed with column specification:
## cols(
## .default = col_double(),
## nta_name = col_character(),
## nta_code = col_character()
## )
## See spec(...) for full column specifications.
poverty Vs SMM
poverty_smm_ggplot =
plots_df %>%
ggplot(aes(x = poverty, y = smm), group = nta_name) +
geom_point(color = "red") +
labs(
title = "Exploration of Poverty and Maternal Morbidity in NYC Neighborhoods",
x = "Percentage Population Below Federal Poverty Level",
y = "Rate of SMM per 10,000 Deliveries")
ggplotly(poverty_smm_ggplot)
poverty2_smm_ggplot =
plots_df %>%
ggplot(aes(x = poverty_level, y = smm)) +
geom_boxplot() +
labs(
title = "Exploration of Levels of Poverty and Maternal Morbidity in NYC Neighborhoods",
x = "Grouped Percentage Population Below Federal Poverty Level",
y = "Rate of SMM per 10,000 Deliveries")
ggplotly(poverty2_smm_ggplot)
## Warning: Removed 25 rows containing non-finite values (stat_boxplot).
late or no prenatal care vs SMM
prenatal_care_ggplot =
plots_df %>%
ggplot(aes(x = late_no_prenatal_care, y = smm, group = nta_name)) +
geom_point(color = "red") +
labs(
title = "Exploration of Access to Prenatal Care and Maternal Morbidity in NYC Neighborhoods",
x = "Percent Live Births Recieving Late or No Prenatal Care",
y = "Rate of SMM per 10,000 Deliveries")
ggplotly(prenatal_care_ggplot)
## Warning: `group_by_()` is deprecated as of dplyr 0.7.0.
## Please use `group_by()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
gonorrhea vs health insurance
gonorrhea1_ggplot =
plots_df %>%
ggplot(aes(x = health_ins, y = gonorrhea), group = nta_name) +
geom_point(color = "green") +
labs(
title = "Exploration of Health Insurance and Gonorrhea in NYC Neighborhoods",
x = "Percent Population with Health Insurance",
y = "Rate of gonorrhea cases per 100,000 (2014-2015)")
ggplotly(gonorrhea1_ggplot)
gonorrhea vs medicaid
gonorrhea2_ggplot =
plots_df %>%
ggplot(aes(x = medicaid_enroll, y = gonorrhea), group = nta_name) +
geom_point(color = "green") +
labs(
title = "Exploration of Medicaid Enrollment and Gonorrhea in NYC Neighborhoods",
x = "Percent Population Enrolled in Medicaid",
y = "Rate of gonorrhea cases per 100,000 (2014-2015)")
ggplotly(gonorrhea2_ggplot)
gonorrhea vs education level
gonorrhea3_ggplot =
plots_df %>%
ggplot(aes(x = edu_less_than_hs, y = gonorrhea), group = nta_name) +
geom_point(color = "green") +
labs(
title = "Exploration of Education Level and Gonorrhea in NYC Neighborhoods",
x = "Percent Population with Less than High School Education",
y = "rate of gonorrhea cases per 100,000 (2014-2015)")
ggplotly(gonorrhea3_ggplot)
health insurance vs preterm birth
preterm_ggplot =
plots_df %>%
ggplot(aes(x = health_ins, y = preterm_births), group = nta_name) +
geom_point(color = "blue") +
labs(
title = "Exploration of Health Insurance and Preterm Births in NYC Neighborhoods",
x = "Percent Population with Health Insurance",
y = "Percent Preterm Births Among All Live Births")
ggplotly(preterm_ggplot)
medicaid enrollment vs preterm birth
preterm2_ggplot =
plots_df %>%
ggplot(aes(x = medicaid_enroll, y = preterm_births, group = nta_name)) +
geom_point(color = "blue") +
labs(
title = "Exploration of Medicaid Enrollment and Preterm Births in NYC Neighborhoods",
x = "Percent Population Enrolled in Medicaid",
y = "Percent Preterm Births Among All Live Births")
ggplotly(preterm2_ggplot)
late or no prenatal care vs preterm births
prenatal_care_ggplot =
plots_df %>%
ggplot(aes(x = late_no_prenatal_care, y = preterm_births, group = nta_name)) +
geom_point(color = "blue") +
labs(
title = "Exploration of Access to Prenatal Care and Preterm Births in NYC Neighborhoods",
x = "Percent Live Births Recieving Late or No Prenatal Care",
y = "Percent Preterm Births Among All Live Births")
ggplotly(prenatal_care_ggplot)